package model

import (
	"gitee.com/liumou_site/gdf"
	"gitee.com/liumou_site/logger"
)

// GetFileSize 获取文件大小
func (info *Info) GetFileSize() {
	info.Url.ContentLength = 0
	info.Url.FileSizeMb = 0
	info.Url.FileSizeMb, info.Url.ContentLength, info.Err = gdf.GetContentLength(info.Url.Url, false)
	if info.Debug {
		logger.Debug("文件大小: ", info.Url.FileSizeMb, " MB")
	}
}
